<form onsubmit="return false" data-auto="true" action="{:request()->url()}" method="post" class='layui-form layui-card' autocomplete="off">
    <div class="layui-card-body padding-top-20">
        <div class="layui-form-item">
            <label class="layui-form-label" for="edition.versionCode">
                <span class="color-green font-w7">版本码</span><br><span class="nowrap color-desc">Version Code</span>
            </label>
            <div class="layui-input-block">
                <input id="edition.versionCode" type="text" name="edition.versionCode" required value="{:sysconf('edition.versionCode')}" placeholder="请输入大于0的版本识别码" class="layui-input">
                <p class="help-block">默认版本识别码为0，当配置的版本识别码大于APP本地的识别码将更新APP</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="color-green font-w7">是否更新</span><br><span class="nowrap color-desc label-required">Is Update</span>
            </label>
            <div class="layui-input-block">
                {foreach ['否','是'] as $key=>$title}
                <label class="think-radio">
                    {if sysconf('edition.is_update') eq $key}
                    <input checked type="radio" name="edition.is_update" value="{$key}" lay-ignore> {$title}
                    {else}
                    <input type="radio" name="edition.is_update" value="{$key}" lay-ignore> {$title}
                    {/if}
                </label>
                {/foreach}
                <p class="help-block">七牛云存储空间所在区域，需要严格对应储存所在区域才能上传文件</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="color-green font-w7">APP设备LOGO</span><br><span class="nowrap color-desc label-required">LOGO</span>
            </label>
            <div class="layui-input-block">
                <input required name="edition.logo" value="{:sysconf('edition.logo')}" placeholder="请上传设备LOGO&nbsp;&nbsp;&nbsp;&nbsp;" class="layui-input">
                <a data-file data-type="png,jpg,gif" data-field="edition.logo" class="input-right-icon layui-icon layui-icon-upload"></a>
                <script>$('[name="edition.logo"]').uploadOneImage()</script>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label" for="edition.versionName">
                <span class="color-green font-w7">APP版本名称</span><br><span class="nowrap color-desc">Version Name</span>
            </label>
            <div class="layui-input-block">
                <input id="edition.versionName" type="text" name="edition.versionName" required value="{:sysconf('edition.versionName')}" placeholder="请输入APP版本名称，例如：1.3.1" class="layui-input">
                <p class="help-block">版本名称仅做展示用</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label" for="edition.appAddress">
                <span class="color-green font-w7">应用地址</span><br><span class="nowrap color-desc">APP Address</span>
            </label>
            <div class="layui-input-block">
<!--                <input id="edition.appAddress" type="text" name="edition.appAddress" required value="{:sysconf('edition.appAddress')}" placeholder="请输入应用下载地址" class="layui-input">-->

                <input required name="edition.appAddress" id="edition.appAddress" value="{:sysconf('edition.appAddress')}" placeholder="请上传APK应用包&nbsp;&nbsp;&nbsp;&nbsp;" class="layui-input">
                <a data-file data-type="png,jpg,gif,apk" data-field="edition.appAddress" class="input-right-icon layui-icon layui-icon-upload"></a>
                <script>$('[name="edition.appAddress"]').uploadOneImage()</script>
                <p class="help-block">应用下载地址这里为安卓地址</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="color-green font-w7">LOGO</span><br><span class="nowrap color-desc label-required">LOGO</span>
            </label>
            <div class="layui-input-block">
                <input required name="edition.business_logo" value="{:sysconf('edition.business_logo')}" placeholder="请上传设备LOGO&nbsp;&nbsp;&nbsp;&nbsp;" class="layui-input">
                <a data-file data-type="png,jpg,gif" data-field="edition.business_logo" class="input-right-icon layui-icon layui-icon-upload"></a>
                <script>$('[name="edition.business_logo"]').uploadOneImage()</script>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label" for="edition.version">
                <span class="color-green font-w7">商戶端版本</span><br><span class="nowrap color-desc">Merchant Version</span>
            </label>
            <div class="layui-input-block">
                <input id="edition.version" type="text" name="edition.version" required value="{:sysconf('edition.version')}" placeholder="请输入商戶端版本" class="layui-input">
                <p class="help-block">商戶端版本仅做展示用</p>
            </div>
        </div>

        <div class="layui-form-item text-center padding-left-40">
            <button class="layui-btn" type="submit">保存配置</button>
            <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗？" data-close>取消修改</button>
        </div>

        <script>form.render()</script>

    </div>
</form>